package com.hyt.it.ogt.kq.common.enums;

import lombok.Getter;

import java.util.ArrayList;
import java.util.List;

/**
 * 业务类型
 */
@Getter
public enum UserBusinessAccessTypeEnum {

    NONE("NONE", "未知"),
    KW_TASK_PERMISSION("KW_TASK_PERMISSION", "考务管理授权"),
    KW_TASK_PERMISSION_EXAMINER("KW_TASK_PERMISSION_EXAMINER", "考务管理授权"),
    BM_STUDENT_QUALIFICATIONS("BM_STUDENT_QUALIFICATIONS", "报名考生资格信息"),
    ;

    public final String code;

    public final String desc;

    UserBusinessAccessTypeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    //本方法只用与监考员，考试任务分配了权限从ks查任务时使用，其他任务不符合
    public static List<String> getKwTaskSelectForKs(){
        List<String> codes = new ArrayList<>(2);
        codes.add(UserBusinessAccessTypeEnum.KW_TASK_PERMISSION.getCode());
        codes.add(UserBusinessAccessTypeEnum.KW_TASK_PERMISSION_EXAMINER.getCode());
        return codes;
    }

}
